/**
 * 主页
 */
import HomePage from "@/views/HomePage.vue";
import { HOME_PAGE, LOGIN_PAGE, INSPECTOR_PAGE } from "@/common/names";
/**
 * 
 */
import {
    BarChartOutline,
    FileTrayFullOutline,
    ClipboardOutline,
    ConstructOutline,
    LockClosedOutline,
    NotificationsCircleOutline,
    PeopleOutline,
    PersonCircleOutline,
    PricetagsOutline,
    SaveOutline,
    HardwareChipOutline,
    SettingsOutline,
    GitNetworkOutline,
    GitPullRequestOutline,
    GridOutline,
    LibraryOutline,
    ReorderFourOutline,
    PersonOutline,
    FlaskOutline,
    Person,
    Newspaper,
    LogoMicrosoft,
    BeakerOutline,
    Pulse,
} from '@vicons/ionicons5';
/**
 * 
 */
import { h } from 'vue';



// 公共路由
export const routes = [
    {
        path: "/",
        name: HomePage,
    },
    {
        path: "/login",
        name: LOGIN_PAGE,
        component: () => import("@/views/LoginPage.vue"),
    },
    {
        path: "/home",
        name: HOME_PAGE,
        component: () => import("@/views/HomePage.vue"),
        children: [
            {
                path: "/inspectors",
                name: INSPECTOR_PAGE,
                meta: {
                    label: "柜子管理",
                    icon: BarChartOutline,
                },
                component: () => import("@/views/inspectors/InspectorPage.vue"),
            },
        ]
    },
    {
        path: "/:pathMatch(.*)*",
        redirect: (to) => {
            return {
                path: "/",
            };
        },
    },
];
